import java.io.*;

/**
 * @ClassName GenerateLogFile
 * @Description: TODO
 * @Author 远志 zhangsong@cskaoyan.onaliyun.com
 * @Date 2022/1/17 10:16
 * @Version V1.0
 **/
public class GenerateLogFile {

    public static void main(String[] args) throws IOException, InterruptedException {
        String inPath = "/home/zsquirrel/compute/input/access.log";
        String outPath = "/home/zsquirrel/compute/output/run.log";
        BufferedReader bufferedReader = new BufferedReader(new FileReader(new File(inPath)));
        String content = null;
        File destFile = new File(outPath);
        BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(destFile, true)));
        while ((content = bufferedReader.readLine()) != null){
            bufferedWriter.write(content);
            bufferedWriter.newLine();
            bufferedWriter.flush();
            //Thread.sleep(10);
        }
        bufferedWriter.close();

    }
}
